package com.easyschool.model.school;

import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import com.easyschool.webservices.adapter.WSDateAdapter;

@XmlRootElement
@Entity
@Table(name="school")
public class School {

	@Id
	@GeneratedValue
	@Column(name = "IDECOLE")
	private Integer idEcole;
	@Column(name = "LIBELLE")
	private String libelleSchool;
	@Column(name = "ADRESSE1")
	private String adresse1;
	@Column(name = "ADRESSE2")
	private String adresse2;
	@Column(name = "ADRESSE3")
	private String adresse3;
	@Column(name = "CODEPOSTAL")
	private Integer codePostal;
	@Column(name = "VILLE")
	private String ville;
	@Column(name = "CREATE_DATE")
	private Date createDate;
	
	
	
	public Integer getIdEcole() {
		return idEcole;
	}
	public void setIdEcole(Integer idEcole) {
		this.idEcole = idEcole;
	}

	public String getLibelleSchool() {
		return libelleSchool;
	}
	public void setLibelleSchool(String libelleSchool) {
		this.libelleSchool = libelleSchool;
	}
	public String getAdresse1() {
		return adresse1;
	}
	public void setAdresse1(String adresse1) {
		this.adresse1 = adresse1;
	}
	public String getAdresse2() {
		return adresse2;
	}
	public void setAdresse2(String adresse2) {
		this.adresse2 = adresse2;
	}
	public String getAdresse3() {
		return adresse3;
	}
	public void setAdresse3(String adresse3) {
		this.adresse3 = adresse3;
	}
	public Integer getCodePostal() {
		return codePostal;
	}
	public void setCodePostal(Integer codePostal) {
		this.codePostal = codePostal;
	}
	public String getVille() {
		return ville;
	}
	public void setVille(String ville) {
		this.ville = ville;
	}

	@XmlJavaTypeAdapter(WSDateAdapter.class)
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	
	

	public School(){}
	
	public School(Integer idEcole, String libelle, String adresse1, String adresse2, String adresse3, Integer codePostal, String ville, Date createDate){
		this.idEcole = idEcole;
		this.libelleSchool = libelle;
		this.adresse1 = adresse1;
		this.adresse2 = adresse2;
		this.adresse3 = adresse3;
		this.codePostal = codePostal;
		this.ville = ville;
		this.createDate = createDate;
	}
	
	public School(Integer idEcole){
		this.idEcole = idEcole;
	}
	
	
	
}
